<?php

namespace app\common\model;

use think\Model;

class ExaminationCategory extends Model
{
    // 连接数据库名称
    //protected $connection = 'db2';
    // 表名
    protected $name = 'base_examination_category';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'created_at';
    protected $updateTime = false;

    public function creator()
    {
        return $this->belongsTo('Admin', 'creator_id', 'id', [], 'LEFT')->field('id,nickname');
    }

}
